package networkcommunicationTCP_IP;
import java.io.*;
import java.net.*;

public class ServerTcp {
	public static void main(String[] args) throws Exception{
		ServerSocket  server =new ServerSocket(12304);
		System.out.println("服务器套接字已经创建成功");
			Socket socket=server.accept();
			BufferedReader reader =new BufferedReader(new InputStreamReader
					(socket.getInputStream()));
		
			String about =null;
			while((about=reader.readLine())!=null) {
				System.out.println(about);
			}
			
				socket.close();
				reader.close();
	}
}
